Skip to content

CNF-18932: fix(makefile): preserve HTTP protocol in TARGET_REPO URL conversion#628

Closed
leo8a wants to merge 1 commit intovalidatedpatterns:mainfrom
leo8a:main
Closed

CNF-18932: fix(makefile): preserve HTTP protocol in TARGET_REPO URL conversion#628
leo8a wants to merge 1 commit intovalidatedpatterns:mainfrom
leo8a:main

Conversation

@leo8a
Copy link
Copy Markdown

@leo8a leo8a commented Jul 29, 2025

The TARGET_REPO sed logic was incorrectly converting HTTP URLs like "http://host/repo.git" to malformed "https://http///host/repo.git" due to aggressive colon replacement.

Updated to only convert SSH URLs (git@) to HTTPS while preserving the original protocol for HTTP/HTTPS URLs.

Fixes validate-origin target failures for HTTP-only repositories.

Signed-off-by: Leonardo Ochoa-Aday lochoa@redhat.com

The TARGET_REPO sed logic was incorrectly converting HTTP URLs like
"http://host/repo.git" to malformed "https://http///host/repo.git"
due to aggressive colon replacement.

Updated to only convert SSH URLs (git@) to HTTPS while preserving
the original protocol for HTTP/HTTPS URLs.

Fixes validate-origin target failures for HTTP-only repositories.

Signed-off-by: Leonardo Ochoa lochoa@redhat.com
@leo8a
Copy link
Copy Markdown
Author

leo8a commented Jul 29, 2025

/cc @beekhof @dminnear-rh

@leo8a
Copy link
Copy Markdown
Author

leo8a commented Aug 11, 2025

If you try to disable the check by

export DISABLE_VALIDATE_ORIGIN=true
./pattern.sh make install

Then the Pattern operator fails with below error

kni_telco-hub-pattern
2025/08/07 12:50:07 	Reconcile step "cloning pattern repo" failed: Get "https://http///jumphost.inbound.bos2.lab:3000/kni/telco-hub-pattern.git/info/refs?service=git-upload-pack": Service Unavailable
2025/08/07 12:50:07 Requeueing

/cc @dminnear-rh

@dminnear-rh
Copy link
Copy Markdown
Contributor

@leo8a closing this PR since a fix will be implemented in #629

thank you for bringing this issue to our attention and making the PR though!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants